<?php
/* @var $this ProductController */
/* @var $model Product */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'product-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	
	<div class="row">
		<?php echo $form->labelEx($model,'brands'); ?>
		<?php echo $form->textField($model,'brands',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'brands'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'vendor_id'); ?>
		<?php $this->widget('ext.combobox.EJuiComboBox', array(
                    'model' => $model,
                    'attribute' => 'vendor_id',
                    'data' => CHtml::listData(Vendor::model()->findAll(),'id','vendor'),
                    'options' => array(
                       'allowText' => false,
                    ),
                    'htmlOptions' => array('size' => 10),
                )); ?>
		<?php echo $form->error($model,'vendor_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'category_id'); ?>
		<?php $this->widget('ext.combobox.EJuiComboBox', array(
                    'model' => $model,
                    'attribute' => 'category_id',
                    'assoc'=>true,
                    'data' => CHtml::listData(Category::model()->findAll(),'id','category'),
                    'options' => array(
                       'allowText' => false,
                    ),
                    'htmlOptions' => array('size' => 10),
                )); ?>
		<?php echo $form->error($model,'category_id'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'wattage'); ?>
		<?php echo $form->textField($model,'wattage'); ?>
		<?php echo $form->error($model,'wattage'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'universal_input'); ?>
		<?php echo $form->textField($model,'universal_input',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'universal_input'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'lumens'); ?>
		<?php echo $form->textField($model,'lumens'); ?>
		<?php echo $form->error($model,'lumens'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'lifetime'); ?>
		<?php echo $form->textField($model,'lifetime',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'lifetime'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'cct'); ?>
		<?php echo $form->textField($model,'cct',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'cct'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'warranty'); ?>
		<?php echo $form->textField($model,'warranty'); ?>
		<?php echo $form->error($model,'warranty'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'powerfactor'); ?>
		<?php echo $form->textField($model,'powerfactor',array('size'=>29,'maxlength'=>29)); ?>
		<?php echo $form->error($model,'powerfactor'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'product_pn'); ?>
		<?php echo $form->textField($model,'product_pn',array('size'=>40,'maxlength'=>40)); ?>
		<?php echo $form->error($model,'product_pn'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'unit_buy'); ?>
		<?php echo $form->textField($model,'unit_buy'); ?>
		<?php echo $form->error($model,'unit_buy'); ?>
	</div>
    
    <div class="row">
		<?php echo $form->labelEx($model,'unit_sell'); ?>
		<?php echo $form->textField($model,'unit_sell'); ?>
		<?php echo $form->error($model,'unit_sell'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->